package org.itboys.store.entity;

import org.itboys.mongodb.entity.BaseLongIdEntity;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;
import org.mongodb.morphia.annotations.Transient;

import java.util.List;

import org.itboys.mongodb.entity.BaseLongIdEntity;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;
import org.mongodb.morphia.annotations.Transient;

/**
 * Created by huml on 2016/4/8.
 * 产品规格详情
 */
@Entity(value="StoreProductSpecDetail", noClassnameStored = true)
public class ProductSpecDetail extends BaseLongIdEntity {

    private static final long serialVersionUID = 1329892208774474449L;
    @Indexed
    private Long productId;//产品id
    private List<Long> categorySpecDetailIds;//规格id   考虑到多个规格组合的情况,这里已集合形式存储
    private Long stock;//库存
    private String price;//售价
    @Transient
    private List<String> categorySpecDetailNames;//规格名称组合
    @Transient
    private String specDetailIdString;//规格id字符串

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public List<Long> getCategorySpecDetailIds() {
        return categorySpecDetailIds;
    }

    public void setCategorySpecDetailIds(List<Long> categorySpecDetailIds) {
        this.categorySpecDetailIds = categorySpecDetailIds;
    }

    public Long getStock() {
        return stock;
    }

    public void setStock(Long stock) {
        this.stock = stock;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public List<String> getCategorySpecDetailNames() {
        return categorySpecDetailNames;
    }

    public void setCategorySpecDetailNames(List<String> categorySpecDetailNames) {
        this.categorySpecDetailNames = categorySpecDetailNames;
    }

    public String getSpecDetailIdString() {
        return specDetailIdString;
    }

    public void setSpecDetailIdString(String specDetailIdString) {
        this.specDetailIdString = specDetailIdString;
    }
}
